﻿#include "stdafx.h"
#include "sbcs.h"
#include "extend/sberror.h"

/// <summary>코드를 메시지로.</summary>
/// <remarks>KSH, 2013-12-21.</remarks>
/// <param name="n">오류 코드.</param>
/// <returns>오류 문자열.</returns>
const char* k_errmsg(kint n)
{
	static const char* _k_err_str[] =
	{
		"no error",
		"unknown error",
		"failed",
		"internal error",
		"exception",
		"not initialized",
		"already finished task",
		"no table found",
		"invalid argument",
		"value is null",
		"value is last",
		"invalid value",
		"empty value",
		"no memory",
		"not support function",
		"syntax error",
		"file not found(no file)",
		"directory not found(no directory)",
		"read fail",
		"write fail",
		"open fail",
		"creation fail",
		"overflow",
		"underflow",
		"already existance",
		"not existance",
		"invalid cast",
		"no mean",
		"not implement yet",
		"invalid target(no target)",
		"stack overflow",
		"not native function",
		"no function found",
		"no operand found",
		"unknown mnemonic",
		"invalid type",
		"read only, do not write",
		"write only, do not read",
		"read denied",
		"write denied",
		"type mismatch",
		"property",
		"parse error",
		"no reference found",
		"unexpected exception",
		"cannot lock",
		"driver error",
		"device error",
		"context error",
		"mapping error",
		"multi-instance is not support",
		"problem(s) in clean up",
		"invalid range",
		"invalid stride value",
	};
	return ((ksize_t)n < K_COUNTOF(_k_err_str)) ? _k_err_str[n] : _k_err_str[1];
}

